package com.jy.api.misc;

import com.jy.api.misc.dto.*;
import com.jy.framework.base.entity.Result;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;


@FeignClient(name = "misc", contextId = "misc-zhiKongAPI", fallback = ZhiKongAPIFallback.class)
public interface ZhiKongAPI {
    @ApiOperation(value = "医院top评分")
    @GetMapping("/shuJuZS/yiYuanTopPF")
    Result<List<ZhiKongPFDto>> yiYuanTopPF(@RequestParam(value = "selectTime",required = true) String selectTime);

    @ApiOperation(value = "数据集top评分")
    @GetMapping("/shuJuZS/shuJuJiTopPF")
    Result<List<ZhiKongPFDto>> shuJuJiTopPF(@RequestParam(value = "hospitalId", required = false) String hospitalId,
                                            @RequestParam(value = "selectTime",required = true) String selectTime);

    @ApiOperation(value = "医院综合评分")
    @GetMapping("/shuJuZS/yiYuanZongHePF")
    Result<ZhiKongPFDto> yiYuanZongHePF(@RequestParam(value = "hospitalId") String hospitalId,
                                        @RequestParam(value = "selectTime",required = true) String selectTime);

    @ApiOperation(value = "数据集综合评分")
    @GetMapping("/shuJuZS/shuJuJiZongHePF")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shujujbsf", value = "数据集标识符", required = true),
    })
    Result<ZhiKongPFDto> shuJuJiZongHePF(@RequestParam(value = "hospitalId",required = true) String hospitalId,
                                         @RequestParam(value = "shujujbsf") String shujujbsf,
                                         @RequestParam(value = "selectTime",required = true) String selectTime);

    @PostMapping("/zhikong/v2/saveYiChangMXFromCache")
    @ApiOperation("质控异常明细")
    Result yiChangMX(@RequestParam("date") String date);

    @PostMapping("/shujuzk/saveOneDay")
    @ApiOperation("保存一天的数据")
    void saveOneDay(@RequestParam("dateStr") String dateStr);

    @PostMapping("/zhikong/v2/shuJuJMX/delete7Days")
    @ApiOperation("删除七天前的数据集明细表")
    void delete7DaysShuJuJMX();

    @PostMapping("/zhikong/v2/zhiKongMRPF")
    @ApiOperation("每日数据集质控评分")
    Result zhiKongMRPF(@RequestParam("riQi") String riQi);

}
